package br.com.JZSolution.domineduplex.swing;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.LayoutManager;

import javax.swing.JPanel;

public class JPanelComBackground extends JPanel {
	private Image background;
	
	public JPanelComBackground(LayoutManager layoutManager) {
		super(layoutManager);
	}
	
	public JPanelComBackground(Image imagem, LayoutManager layoutManager) {
		super(layoutManager);
		this.background = imagem;
	}
	
	@Override
	protected void paintComponent(final Graphics g) {
		super.paintComponent(g);
		g.drawImage(background, 0, 0, this);
	}
}
